package com.safone.thirdattendanceservices.schoolgate.controllers;


import com.safone.thirdattendanceservices.schoolgate.services.SchoolGateService;
import lombok.AllArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 第三方出入口考勤数据接口
 * @author xy
 * @date 2020/12/4 20:16
 */
@RestController
@AllArgsConstructor
@RequestMapping(value = "/api/safe/external/open/dh")
public class SchoolGateController {

    private SchoolGateService schoolGateService;

    /**
     * 获取考勤库统计信息
     * @return
     */
    @GetMapping(value = "/schoolGateAttendance/get/all")
    public ResponseEntity<Map> getAllSchoolGateAttendance(){
        return schoolGateService.getAllSchoolGateAttendance();
    }

    /**
     * 获取单个学生统计信息详情
     * @return
     */
    @GetMapping(value = "/schoolGateAttendance/get/one")
    public Object getOneSchoolGateAttendance(){
        return schoolGateService.getOneSchoolGateAttendance();
    }

    /**
     * 访客详情查询
     * @return
     */
    @GetMapping(value = "/visitor/detail/get")
    public Object getVisitorDetailById(){
        return schoolGateService.getVisitorDetailById();
    }

    /**
     * 访客列表查询
     * @return
     */
    @GetMapping(value = "/visitor/get8page")
    public Object getVisitorByPage(){
        return schoolGateService.getVisitorByPage();
    }
}
